<?php

/** @var \Illuminate\Database\Eloquent\Factory $factory */

use Faker\Generator as Faker;


$factory->define(App\Models\CallBack::class, function (Faker $faker) {

    // 随机取 5 年前到现在的时间
    $updated_at = $faker->dateTimeBetween('-5 years');
    // 传参为生成最大时间不超过，创建时间永远比更改时间要早
    $created_at = $faker->dateTimeBetween('-5 years',$updated_at);
    $call_at = $faker->dateTimeBetween($created_at, 'now');
    return [
        'callback_at' => $call_at,
        'client_said' => $faker->realText(50),
        'client_feel' => $faker->numberBetween(1,5),
        'callback_by' => $faker->numberBetween(1,2),
        'created_at' => $created_at,
        'updated_at' => $updated_at,
    ];
});
